home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-10-31 | 3.2 KB | 103 lines | [TEXT/CWIE] |
- USING F2CMAKE WITH CODEWARRIOR MPW TOOLS AND MAC F2C
-
- The folder "MPW/Toolserver Tools" contains three MPW tools: F2CMake,
- CWMake and CWOpen. If you are using MPW (not Toolserver), you only need
- F2CMake.
-
- Metrowerks CodeWarrior comes with the complete MPW environment. If you
- are using this environment, you can use F2CMake to integrate Mac F2C
- in the build process.
-
- F2CMake accepts a command line string containing Unix style options and
- one or more filenames to send them in a "kAEf2cEvent" AppleEvent to
- Mac F2C which will translate the file(s). If Mac F2C is not currently
- running, F2CMake will try to launch it.
-
-
- INSTALLATION
-
- - Copy F2CMake into the "Tools" folder of MPW.
-
- - Copy F2C.Help into the MPW folder.
-
- - Set the appropiate options in the "Compiler Interactions..."
- dialog of Mac F2C. You can uncheck all options if you want
- your makefile to control the build process completely, but
- it makes sense to set the interaction mode to "Touch changed
- files" and check the "Add output C/C++ files to active project
- as necessary".
-
-
- USAGE
-
- First Build:
-
- - Start MPW.
-
- - Use the "Directory" command to move to your project folder.
-
- - Enter a Makefile like this one in a new editor window:
-
- # Sample makefile
- OBJECTS = Sample.c.o "{F2CLibraries}"main.c.o
-
- C = MWCPPC
- COptions = -w full -i "{MWCIncludes}"
- Link = MWLinkPPC
- LinkOptions = -t APPL -c '????'
-
- Sample ƒƒ {OBJECTS}
- {Link} {LinkOptions} ∂
- {OBJECTS} ∂
- "{MWPPCLibraries}"InterfaceLib ∂
- "{MWPPCLibraries}"MWCRuntime.Lib ∂
- "{MWPPCLibraries}ANSI C.PPC.Lib" ∂
- "{MWPPCLibraries}"SIOUX.PPC.Lib ∂
- "{MWPPCLibraries}"MathLib ∂
- "{F2CLibraries}"libF77.PPC ∂
- "{F2CLibraries}"libI77.PPC ∂
- -o Sample
-
- Sample ƒƒ GenericCFRG.r
- Rez -a -o Test -d APPNAME=∂"Sample∂" GenericCFRG.r
-
- .c ƒ .f
- F2CMake -f -!i8 -A -a -E -ec -R -w66 {Default}.f
- # makefile end
-
- This Makefile assumes that you build a PPC application and that
- you have declared and exported a MPW shell variable named
- {F2CLibraries} that contains the pathname to the folder where the
- F2C libraries and "main.c" resides. The file "f2c.h" should be in
- {MWCIncludes} or in the project folder and in {F2CLibraries}.
-
- Please look into the folder "Tom Thompsons PowerMac Book:Code
- Examples PPC ƒ:MacHello" on the CW CD for the "GenericCFRG.r" file
- that is needed to let the Mac OS know that your application contains
- PPC code.
-
- The F2C options are just examples.
-
- - Save the Makefile under the name "Makefile" into your
- project folder.
-
- - Type "Make" and execute the commands written to the MPW worksheet.
- Mac F2C runs faster if you bring it to the foreground.
-
-
- Subsequent Builds:
-
- - Edit your Fortran source files.
-
- - Type "BuildProgram <name>", where <name> is the name of the
- target application ("Sample").
- The commands needed to update the project are executed and
- written to the shell window. Mac F2C runs faster if you bring
- it to the foreground.
-
-
- If you need help about one of the F2C MPW tools, type
-
- help toolname
-
-